package com.ydy.mapper;

import com.ydy.my.mapper.MyMapper;
import com.ydy.pojo.ItemsComments;
import com.ydy.pojo.vo.ItemCommentVO;
import com.ydy.pojo.vo.MyCommentVO;
import com.ydy.utils.PageInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItemsCommentsMapper extends MyMapper<ItemsComments> {
    /**根据商品id查询商品的评价（分页）*/
    List<ItemCommentVO> queryPagedComments(@Param("itemId") String itemId, @Param("level") Integer level);

    /**根据用户id查询商品的评价（分页）*/
    List<MyCommentVO> queryMyComments(String userId);

    /**保存我的评论*/
    void saveComments(Map<String, Object> map);
}